<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<button @click="addMsg()">数据填充</button>
			<!-- v-for指令可以遍历数组结构的内容，常与数组搭配使用 -->
			<h2 v-for="item,index in listData">{{index+1}}、{{item}}</h2>
		</div>
	</body>
	<script>
		var app=new Vue({
			el:"#app",
			data:{
				listData:["java","mysql","python"]
			},
			methods:{
				addMsg:function(){
					this.listData.push("vue")
				}
			}
		})
	</script>
</html>
